package com.lemner.www.hongyu.Service;

import com.lemner.www.hongyu.Bean.BegintorepairBean;
import com.lemner.www.hongyu.Bean.FadanBean;
import com.lemner.www.hongyu.Bean.FinishedrepairBean;
import com.lemner.www.hongyu.Bean.FinishorderBean;
import com.lemner.www.hongyu.Bean.GetcodeBean;
import com.lemner.www.hongyu.Bean.GetdepartmentBean;
import com.lemner.www.hongyu.Bean.GetdepartpersonBean;
import com.lemner.www.hongyu.Bean.RoborderBean;
import com.lemner.www.hongyu.Bean.ToverifycodeBean;
import com.lemner.www.hongyu.Bean.TranorderBean;
import com.lemner.www.hongyu.Bean.UndistributedOrderbean;
import com.lemner.www.hongyu.Bean.UnfinishorderBean;
import com.lemner.www.hongyu.Bean.Userbean;

import java.sql.Array;
import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by 小博 on 2017/10/11.
 */

public interface Service {
    //登陆
    @GET("WorkerApi/User/Login")
    Call<Userbean>getLogin(
            @Query("phonenum")String phonenum,
            @Query("password") String password
    );
    //注册
    @GET("WorkerApi/User/changePassword")
    Call<Userbean>getRevise(@Query("worker_id") int worker_id,
                            @Query("password") String password);
    //获取验证码
    @GET("WorkerApi/User/getPhoneVerifyCode")
    Call<GetcodeBean> getCode(@Query("phonenum") String phonenum);
    //验证验证码
    @GET("WorkerApi/User/toVerifyCode")
    Call<ToverifycodeBean> verifyCode(
            @Query("phonenum") String phonenum,
            @Query("code") String code);
    //打卡
    @GET("WorkerApi/Attendance/toAttendance")
    Call<Userbean>getSign(@Query("worker_id") int worker_id,
                          @Query("x") String x,
                          @Query("y") String y,
                          @Query("flag") int flag,
                          @Query("date") String date
    );
    //获取部门
    @GET(" WorkerApi/Department/getDepartment")
    Call<GetdepartmentBean>getDepartment(
            @Query("community_id") int community_id
    );
    //未分配订单
    @GET("WorkerApi/Order/getUndistributedOrder")
    Call<UndistributedOrderbean>getUndistributedOrder(
            @Query("community_id") String community_id,
            @Query("worker_id") int worker_id
    );
    //发单
    @GET("WorkerApi/Order/sendOrder")
    Call<FadanBean>getFadan(
            @Query("worker_id") int worker_id,
            @Query("department_id")  int department_id,
            @Query("community_id") int community_id,
            @Query("cause")  String cause,
            @Query("image") Array image
    );
    //抢单 接单
    @GET("WorkerApi/Order/toRobOrder")
    Call<RoborderBean>getJiedan(
            @Query("order_id") int order_id,
            @Query("worker_id") int worker_id
    );
    //未完成订单
    @GET("WorkerApi/Order/unfinishedOrder")
    Call<UnfinishorderBean>getUnfinishorder(
            @Query("community_id") String community_id,
            @Query("worker_id") int worker_id
    );
    //获取部门人员
    @GET("WorkerApi/Department/getStaffList")
    Call<GetdepartpersonBean>getStaff(
            @Query("community_id") int community_id,
            @Query("worker_id") int worker_id
    );
    //转单
    @GET("WorkerApi/Order/transmitOrder")
    Call<TranorderBean>getTran(
            @Query("order_id") int order_id,
            @Query("worker_id") int worker_id,
            @Query("workerPerson_id") int workerPerson_id
    );
    //开始维修
    @GET("WorkerApi/Repair/beginToRepair")
    Call<BegintorepairBean>getBegin(
            @Query("order_id") int order_id,
            @Query("worker_id") int worker_id
    );
    //完成维修
    @GET("WorkerApi/Repair/finishedRepair")
    Call<FinishedrepairBean>getFinish(
            @Query("order_id") int order_id,
            @Query("worker_id") int worker_id
    );
    //提交维修结果
    @GET("WorkerApi/Repair/toSubmitResult")
    Call<FinishedrepairBean>commit(
            @Query("order_id") int order_id,
            @Query("worker_id") int worker_id,
            @Query("record_content")String  record_content,
            @Query("image") Array image
    );
    //查询已完成订单
    @GET("WorkerApi/Order/getCompletedOrderList")
    Call<FinishorderBean>getComplete(
            @Query("worker_id") int worker_id,
            @Query("community_id") String community_id
    );

}
